home *** CD-ROM | disk | FTP | other *** search
/ Freelog 121 / FreelogMagazineJuilletAout2014-No121.iso / Outils / Adobe-Air / adobe-air_13.exe / [0] / setup.swf / scripts / mx / skins / halo / ScrollTrackSkin.as < prev    next >
Text File  |  2014-03-27  |  2KB  |  57 lines

  1. package mx.skins.halo
  2. {
  3.    import flash.display.GradientType;
  4.    import mx.core.FlexVersion;
  5.    import mx.core.mx_internal;
  6.    import mx.skins.Border;
  7.    import mx.styles.StyleManager;
  8.    import mx.utils.ColorUtil;
  9.    
  10.    use namespace mx_internal;
  11.    
  12.    public class ScrollTrackSkin extends Border
  13.    {
  14.       
  15.       mx_internal static const VERSION:String = "3.0.0.0";
  16.        
  17.       
  18.       public function ScrollTrackSkin()
  19.       {
  20.          super();
  21.       }
  22.       
  23.       override public function get measuredWidth() : Number
  24.       {
  25.          return 16;
  26.       }
  27.       
  28.       override public function get measuredHeight() : Number
  29.       {
  30.          return 1;
  31.       }
  32.       
  33.       override protected function updateDisplayList(param1:Number, param2:Number) : void
  34.       {
  35.          super.updateDisplayList(param1,param2);
  36.          var _loc3_:Array = getStyle("trackColors");
  37.          StyleManager.getColorNames(_loc3_);
  38.          var _loc4_:uint = ColorUtil.adjustBrightness2(getStyle("borderColor"),-20);
  39.          var _loc5_:uint = ColorUtil.adjustBrightness2(_loc4_,-30);
  40.          graphics.clear();
  41.          var _loc6_:Number = 1;
  42.          if(name == "trackDisabledSkin" && FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)
  43.          {
  44.             _loc6_ = 0.2;
  45.          }
  46.          drawRoundRect(0,0,param1,param2,0,[_loc4_,_loc5_],_loc6_,verticalGradientMatrix(0,0,param1,param2),GradientType.LINEAR,null,{
  47.             "x":1,
  48.             "y":1,
  49.             "w":param1 - 2,
  50.             "h":param2 - 2,
  51.             "r":0
  52.          });
  53.          drawRoundRect(1,1,param1 - 2,param2 - 2,0,_loc3_,_loc6_,horizontalGradientMatrix(1,1,param1 / 3 * 2,param2 - 2));
  54.       }
  55.    }
  56. }
  57.